#ifndef OBJ_VECT_HH
# define OBJ_VECT_HH

#include <tbb/concurrent_hash_map.h>

#include "../physic/object.hh"

class ObjVect
{
public:
  ObjVect ();

  void add (Object* o);
  void del (Object* o);
  Object* operator[] (int id);

  typedef tbb::concurrent_hash_map<int, Object*>::iterator iterator;

  iterator begin ();
  iterator end ();

protected:
  int size_;
  tbb::concurrent_hash_map<int, Object*> v_;

  static const int maxsize;
};

#endif /// !OBJ_VECT_HH
